home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / os2 / zoc110.arj / ZOC / SCRIPT / SAMPLES / 4_DECIS < prev    next >
Text File  |  1993-10-07  |  931b  |  40 lines

  1. ////////////////////////////////////////////////////////
  2. // FUN WITH DECISIONS
  3. ////////////////////////////////////////////////////////
  4. // after a decision you may type one command
  5. // but you may repeat the decision (see ASCII part)
  6.  
  7. // NUMERIC DECISION //////////////
  8.  
  9. // do a little loop
  10. setn num 10
  11.  
  12. // (this is a label for goto)
  13. :loop
  14.     write "%num%.^I"
  15.     writeln " to go"
  16.     dec num
  17.     compn %num% with 0
  18.     ifhigh goto loop
  19.  
  20. // loop done
  21. writeln "ready"
  22.  
  23. // ASCII DECISION //////////////
  24. request "What do you like?" "WinNT" "OS/2" "DOS"
  25. compa "%lastline%" with "OS/2"
  26. ifnequ writeln "Boooo!"
  27. ifnequ writeln "Boooo!"
  28.  
  29. ask "Type text that contains 'OS2' or 'ZOC'"
  30. compa "%lastline%" with "OS2"
  31. ifin  writeln "You mentioned OS2" 
  32. ifnin writeln "You did not mention OS2"
  33.  
  34. compa "%lastline%" with "ZOC"
  35. ifin  writeln "You mentioned ZOC" 
  36. ifnin writeln "You did not mention ZOC"
  37.  
  38. // end it
  39. endscript
  40.